
public class Equip implements Comparable<Equip>{
	public enum Type {Armor, Helm, Weapon}
	private int Str;
	private int Int;
	private int Hp;
	private int Mp;
	private int Def;
	private int Mdef;
	private int cost;
	private int sell;
	private int qty;
	private Type type;
	private String name;
	private String description;
	//Try to read from catalog based on name in future
	public Equip(Equip e, int qty){
		if(e == null)
			return;
		this.qty = qty;
		this.Str = e.Str;
		this.Int = e.Int;
		this.Mdef = e.Mdef;
		this.Def = e.Def;
		this.Hp = e.Hp;
		this.Mp = e.Mp;
		this.cost = e.cost;
		this.sell = e.sell;
		this.type = e.type;
		this.name = e.name;
		this.description = e.description;
		e.setQty(e.getQty() - qty);
	}
	public Equip(String name, Type type, String description, int[] stats, int cost, int Quantity){
		this.name = name;
		this.type = type;
		this.description = description + ", Str: " + stats[0] + " Int: " + 
		stats[1] + " Hp: " + stats[2] + " Mp: " + stats[3] + " Def: " 
				+ stats[4] + " Mdef: " + stats[5];
		Str = stats[0];
		Int = stats[1];
		Hp = stats[2];
		Mp = stats[3];
		Def = stats[4];
		Mdef = stats[5];
		this.cost = cost;
		this.sell = cost / 2;
		this.setQty(Quantity);
	}
	public String description(){
		return description;
	}
	public Type getType() {
		return type;
	}
	public int getStr() {
		return Str;
	}
	public int getInt() {
		return Int;
	}
	public int getHp() {
		return Hp;
	}
	public int getMp() {
		return Mp;
	}
	public int getDef() {
		return Def;
	}
	public int getMdef() {
		return Mdef;
	}
	public String getName(){
		return name;
	}
	public int compareTo(Equip arg0) {
		Equip temp = (Equip) arg0;
		return getName().compareTo(temp.getName());
	}
	public int getCost(){
		return cost;
	}
	public int getSellPrice(){
		return sell;
	}
	public int getQty() {
		return qty;
	}
	public void setQty(int qty) {
		this.qty = qty;
	}
}
